package is.ru.honn.rupin.data;

import is.ru.honn.rupin.domain.Board;
import is.ru.honn.rupin.domain.Pin;
import org.springframework.jdbc.core.simple.ParameterizedRowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * Created by Sigrún Inga Kristinsdóttir.
 * Date: 19.10.2012
 * Time: 16:09
 * copyright (c) sigruninga&susanne
 *
 * @author Sigrún Inga kristindóttir og Susanne Götz
 * @version 1.1
 */

/**
 * Mapper sem er notaður í PinData.
 */
public class PinRowMapper implements ParameterizedRowMapper<Pin>
{

    public Pin mapRow(ResultSet resultSet, int i) throws SQLException
    {
        Pin pin = new Pin(resultSet.getString("link"),
                resultSet.getString("description"),
                resultSet.getString("image"));

        return pin;
    }
}
